import axios from '@/libs/api.request'

// 获取轮播图列表
export const getSliderList = () => {
  return axios.request({
    url: 'Home/getSliderList',
    method: 'post',
    noToken: true
  })
}

// 获取系统配置
export const getConfig = () => {
  return axios.request({
    url: 'Home/getConfig',
    method: 'post'
  })
}

// 进度查询
export const progressQuery = ({ cid, status, pageId }) => {
  const data = {
    cid, status, pageId
  }
  return axios.request({
    url: 'Home/progressQuery',
    data,
    method: 'post'
  })
}

// 进度查询详情
export const progressQueryDetail = (id) => {
  return axios.request({
    url: 'Home/progressQueryDetail',
    data: {id},
    method: 'post'
  })
}

// 申请贷款
export const addLoanApplication = ({ cid, applyName, applyMobile, IDNumber, channelSrc, picture }) => {
  const data = {
    cid,
    applyName,
    applyMobile,
    IDNumber,
    channelSrc,
    picture
  }
  return axios.request({
    url: 'Home/addLoanApplication',
    data,
    method: 'post'
  })
}
